local tools = {
    PhysicsRadiusToHightLightCircle_FixFactor = 1.5, -- 高亮圈跟随物理半径的缩放系数
    alpha_rts_line_fix_scale = 2.3, -- 这个值用于修正 指示线 能汇聚成一点
}

---随机偏移目标点
---@param x number
---@param z number
---@return number
---@return number
---@nodiscard
function tools:FixTargetPoint(x,z)
    local offset_distance = 2 -- 偏移距离可以根据需要调整

    local angle = math.random() * 2 * math.pi

    local offset_x = offset_distance * math.cos(angle)
    local offset_z = offset_distance * math.sin(angle)

    return x + offset_x, z + offset_z
end

---二次筛选框选单位
---@param mob ent
---@return boolean
---@nodiscard
function tools:SelectUnitFilter(mob)
    local prefab = mob and mob.prefab
    if prefab and prefab == 'spider' then
        return true
    end
    return false
end

return tools